package poker.logic;

import poker.util.PokerCombinations;

public class ConcreteHandConfiguration extends AbstractHandConfiguration{

	private PokerCombinations configName;
		
	public ConcreteHandConfiguration(PokerCombinations name){
		configName = name;
		rank = -1;
		parentConfig = null;
	}
	
	public ConcreteHandConfiguration(PokerCombinations name, int rank){
		configName = name;
		this.rank = rank;
		this.parentConfig = null;
	}
	public ConcreteHandConfiguration(PokerCombinations name, AbstractHandConfiguration parentConfig, int rank){
		configName = name;
		this.parentConfig = parentConfig;
	}
	
	public String toString(){
		return configName.name();
	}

	public boolean checkIfIsParent(AbstractHandConfiguration p2Check) {
		if(p2Check.rank > parentConfig.rank){
			return true;
		}else{
			return false;
		}
	}

}
